<template>
  <div>
    <!-- <div class="liveCourse">
      <div style="width: 500px">
        <a-tabs default-active-key="1" :tab-position="tabPosition">
          <a-tab-pane
            :tab="item.course.courseTitle"
            v-for="(item, index) in livecourseList"
            :key="index"
          >
            
            <div>
            <img :src="item.course.coverFileUrl" alt="" />
        </div>
          </a-tab-pane>
        </a-tabs>
      </div>
    </div> -->
    <section class="liveCourses">
      <h2>直播课程</h2>
      <div class="live">
        <div class="liveimg">
          <h3>研究生复试之高效准备简历的方法</h3>
          <p>直播结束</p>
          <button class="liveendbtn">直播结束</button>
        </div>
        <div class="live-right">
          <ul
            class="livelist"
            v-for="(item, index) in livecourseList"
            :key="index"
          >
            <li>
              <p></p>
              <i>直播结束</i>
              <span> {{ item.course.courseTitle }}</span>
            </li>
            <!-- <li>
                          <p></p>
                          <i>直播结束</i>
                          <span> 研究生复试之高效准备简历的方法</span>
                      </li>
                      <li>
                          <p></p>
                          <i>直播结束</i>
                          <span> 研究生复试之高效准备简历的方法</span>
                      </li>
                      <li>
                          <p></p>
                          <i>直播结束</i>
                          <span> 研究生复试之高效准备简历的方法</span>
                      </li> -->
          </ul>
        </div>
      </div>
    </section>
    <!-- <div class="div"></div> -->
  </div>
</template>

<script>
import {livecourse} from "../api/api"
export default {
  name: "liveCourses",
  data() {
    return {
      tabPosition: "right",
      livecourseList: "[]",
    };
  },
  created() {
    // this.$axios
    //   .post("/api/pc/liveCourseInfo/list")
    //   .then((res) => {
    //     console.log(res);
    //     this.livecourseList = res.data.rows;
    //   });
    livecourse().then(res=>{
        this.livecourseList=res.rows
    })
  },
};
</script>
<style scoped lang="less">
/deep/.ant-tabs-nav-wrap {
  width: 600px;
}
.liveCourse {
  margin: auto;
  width: 1200px;
}
.ant-tabs {
  width: 1200px;
  height: 350px;
}
.div {
  margin: auto;
  width: 500px;
  height: 200px;
  background-color: red;
}
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
a {
  color: black;
  text-decoration: none;
}
a:hover {
  color: red;
}
ul {
  list-style: none;
}
.liveCourses {
  margin: auto;
}
.liveCourses > h2 {
  margin: 50px 0 20px 0;
  text-align: center;
  font-size: 24px;
  color: #333;
  font-weight: normal;
}
.live {
  margin: auto;
  width: 1200px;
  height: 350px;
}
.liveimg {
  position: relative;
  float: left;
  width: 50%;
  height: 100%;
  text-align: center;
  display: flex;
  /* display: block; */
  flex-direction: column;
  /* background-color: rgba(0,0,0,1); */
  background-image: url(https://online-course.nos-eastchina1.126.net/封面-1258625253353979904.png);
  background-size: 100% 100%;
}
.liveimg::before {
  content: "";
  position: absolute;
  top: 0px;
  width: 600px;
  height: 100%;
  background-color: #000;
  opacity: 0.6;
}
.live-right {
  width: 50%;
  height: 100%;
  float: right;
  justify-content: center;
  /* padding-top: 70px; */
  font-size: 30px;
  background-color: #f4f4f4;
}
.liveimg > h3 {
  position: relative;
  margin-top: 100px;
  margin-bottom: 20px;
  font-size: 24px;
  color: #fff;
  font-weight: normal;
}
.liveimg > p {
  position: relative;
  font-size: 14px;
  color: #fff;
}
.liveendbtn {
  position: relative;
  margin: 40px 0 0 210px;
  width: 180px;
  height: 50px;
  font-size: 18px;
  color: #fff;
  background-color: #00cf8c;
  border-color: #00cf8c;
  text-align: center;
}
.livelist > li {
  height: 50px;
  line-height: 50px;
  padding: 0 10px 0 0px;
  font-size: 16px;
}
.livelist > li:hover {
  background-color: #fff;
  color: #00cf8c;
}
.livelist > li > i {
  margin: 0 30px;
  font-size: 14px;
  font-style: normal;
}
</style>
